<?php

namespace App\LeShua;

class LeShuaNotify
{
    private $content;

    public function __construct($content)
    {
        $this->content = simplexml_load_string($content);
    }

    public function getSelfOrderNo()
    {
        return $this->getContent('third_order_id');
    }

    public function getAmount()
    {
        return $this->getContent('amount');
    }

    public function getStatus()
    {
        return $this->getContent('status');
    }

    private function getContent($key)
    {
        return $this->content->$key;
    }
}
